/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.sorbonne.soa.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Nairo
 */
@Entity
@Table(name = "INVOICEDELAYPENALTY")
@NamedQueries({@NamedQuery(name = "Invoicedelaypenalty.findAll", query = "SELECT i FROM Invoicedelaypenalty i"), @NamedQuery(name = "Invoicedelaypenalty.findByPenaltyinvoiceid", query = "SELECT i FROM Invoicedelaypenalty i WHERE i.penaltyinvoiceid = :penaltyinvoiceid"), @NamedQuery(name = "Invoicedelaypenalty.findByOrderid", query = "SELECT i FROM Invoicedelaypenalty i WHERE i.orderid = :orderid"), @NamedQuery(name = "Invoicedelaypenalty.findByInvoicetype", query = "SELECT i FROM Invoicedelaypenalty i WHERE i.invoicetype = :invoicetype"), @NamedQuery(name = "Invoicedelaypenalty.findByAmount", query = "SELECT i FROM Invoicedelaypenalty i WHERE i.amount = :amount"), @NamedQuery(name = "Invoicedelaypenalty.findByIspaid", query = "SELECT i FROM Invoicedelaypenalty i WHERE i.ispaid = :ispaid")})
public class Invoicedelaypenalty implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "PENALTYINVOICEID")
    private Integer penaltyinvoiceid;
    @Basic(optional = false)
    @Column(name = "ORDERID")
    private String orderid;
    @Basic(optional = false)
    @Column(name = "INVOICETYPE")
    private String invoicetype;
    @Basic(optional = false)
    @Column(name = "AMOUNT")
    private double amount;
    @Basic(optional = false)
    @Column(name = "ISPAID")
    private int ispaid;

    public Invoicedelaypenalty() {
    }

    public Invoicedelaypenalty(Integer penaltyinvoiceid) {
        this.penaltyinvoiceid = penaltyinvoiceid;
    }

    public Invoicedelaypenalty(Integer penaltyinvoiceid, String orderid, String invoicetype, double amount, int ispaid) {
        this.penaltyinvoiceid = penaltyinvoiceid;
        this.orderid = orderid;
        this.invoicetype = invoicetype;
        this.amount = amount;
        this.ispaid = ispaid;
    }

    public Integer getPenaltyinvoiceid() {
        return penaltyinvoiceid;
    }

    public void setPenaltyinvoiceid(Integer penaltyinvoiceid) {
        this.penaltyinvoiceid = penaltyinvoiceid;
    }

    public String getOrderid() {
        return orderid;
    }

    public void setOrderid(String orderid) {
        this.orderid = orderid;
    }

    public String getInvoicetype() {
        return invoicetype;
    }

    public void setInvoicetype(String invoicetype) {
        this.invoicetype = invoicetype;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public int getIspaid() {
        return ispaid;
    }

    public void setIspaid(int ispaid) {
        this.ispaid = ispaid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (penaltyinvoiceid != null ? penaltyinvoiceid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Invoicedelaypenalty)) {
            return false;
        }
        Invoicedelaypenalty other = (Invoicedelaypenalty) object;
        if ((this.penaltyinvoiceid == null && other.penaltyinvoiceid != null) || (this.penaltyinvoiceid != null && !this.penaltyinvoiceid.equals(other.penaltyinvoiceid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "fr.sorbonne.soa.entity.Invoicedelaypenalty[penaltyinvoiceid=" + penaltyinvoiceid + "]";
    }

}
